extends Node2D

enum SelectValueEnum{
	START_GAME,QUIT_GAME,STOP
}

var selectValue = SelectValueEnum.START_GAME


func gameInputSelectListener():
	if Input.is_action_just_pressed("up") and selectValue != SelectValueEnum.START_GAME:
		selectValue = SelectValueEnum.START_GAME
		$SelectIcon.position.y = $SelectIcon.position.y - 20
	elif Input.is_action_just_pressed("down") and selectValue != SelectValueEnum.QUIT_GAME:
		selectValue = SelectValueEnum.QUIT_GAME
		$SelectIcon.position.y = $SelectIcon.position.y + 20
		
	
	if Input.is_action_just_pressed("action"):
		match selectValue:
			SelectValueEnum.START_GAME:
				print("开始游戏")
				SMG.change_scene("load_game")
			SelectValueEnum.QUIT_GAME:
				print("退出程序")
				get_tree().quit()


func _physics_process(delta):
	
	gameInputSelectListener()
	
	pass
